import React, { useEffect } from 'react'
import axios from 'axios';
import { getGoods } from '@api/goods';

export default function AxiosCom() {
  //组件挂载完成, 请求商品数据
  useEffect(() => {
    let getData = async () => {
      //获取数据       
      let result = await getGoods();
      console.log(result[0].img);
    }
    getData();
  }, [])
  return (
    <div>2-AxiosCom</div>
  )
}
